package com.coment.enums;

public enum ApiPushType {
   gift("live_gift", "giftSend", PushType.gift),
   like("live_like", "like", PushType.like),
   fansclub("live_fansclub", "fansclub", PushType.fansclub),
   comment("live_comment", "liveComment", PushType.content);

   private final String dyValue;
   private final String ksValue;
   private final PushType pushType;

   public static PushType fromToPushType(final String value) {
      for(ApiPushType apiPushType : values()) {
         if (apiPushType.ksValue.equals(value)) {
            return apiPushType.getPushType();
         }

         if (apiPushType.dyValue.equals(value)) {
            return apiPushType.getPushType();
         }
      }

      throw new IllegalArgumentException("不支持的直播间数据" + value);
   }




   public String getDyValue() {
      return this.dyValue;
   }

   
   public String getKsValue() {
      return this.ksValue;
   }

   
   public PushType getPushType() {
      return this.pushType;
   }

   
   ApiPushType(final String dyValue, final String ksValue, final PushType pushType) {
      this.dyValue = dyValue;
      this.ksValue = ksValue;
      this.pushType = pushType;
   }

   // $FF: synthetic method
   private static ApiPushType[] $values() {
      return new ApiPushType[]{gift, like, fansclub, comment};
   }
}
